package com.ease.platform.message;

import java.util.Locale;

public class MessageManager {

	private IMessageService messageService;

	private static MessageManager instance = null;

	private MessageManager() {
		MessageManager.instance = this;
	}

	public static MessageManager getInstance() {

		return MessageManager.instance;
	}

	public String getMessage(String code) {
		return messageService.getMessage(code);
	}

	public String getMessage(String code, Object[] args) {
		return messageService.getMessage(code, args);
	}

	public String getMessage(String code, Object[] args, String defaultMessage) {
		return messageService.getMessage(code, args, defaultMessage);
	}

	public String getMessage(String code, Object[] args, String defaultMessage, Locale locale) {
		return messageService.getMessage(code, args, defaultMessage, locale);
	}

	public IMessageService getMessageService() {
		return messageService;
	}

	public void setMessageService(IMessageService messageService) {
		this.messageService = messageService;
	}

}
